INSTALL=@INSTALL@

srcdir = .
top_srcdir = @top_srcdir@
VPATH = @srcdir@/src
prefix = @prefix@
exec_prefix = @exec_prefix@
top_builddir = .

pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@

install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)

build_triplet = @build@
host_triplet = @host@
target_triplet = @target@

bindir=${prefix}/bin
libdir=${prefix}/lib

AR = @AR@
AS = @AS@
CC = @CC@
CFLAGS = @CFLAGS@ -Wall -fpic
CPPFLAGS = @CPPFLAGS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@ -shared
RANLIB = @RANLIB@

CPPFLAGS += -I$(top_builddir)/src -I$(top_srcdir)/src
CPPFLAGS += @MAT_DEBUG@

HEADERS = src/gp-events.h \
 src/gp-probe.h

SOURCES = \
	src/gp-events.c \
	src/gp-probe.c \
	src/gp-remote.c \
	src/gp-file.c \
	src/gp-socket.c \
	src/gp-malloc.c \
	src/gp-proc.c \
	src/shm-channel.c \
	src/shm-ops.c \
	@CPU_FILES@

OBJS=gp-events.o \
	gp-probe.o \
	gp-remote.o \
	gp-file.o \
	gp-malloc.o \
	gp-socket.o \
	gp-proc.o \
	shm-channel.o \
	shm-ops.o \
	@CPU_OBJS@

LIBNAME=libgpmat.so

COMPILE=$(CC) $(CFLAGS) $(CPPFLAGS)

LIBS=-ldl

all:	$(LIBNAME)

clean:
	$(RM) -f $(OBJS) $(LIBNAME)

$(LIBNAME):		$(OBJS)
	$(CC) -o $(LIBNAME) $(LDFLAGS) $(OBJS) $(LIBS)

install:
	$(INSTALL) $(LIBNAME) ${libdir}/

.c.o:
	$(COMPILE) -c $<



.NOEXPORT:
